package com.wangxinyuchuan.demo.handler;

import com.wangxinyuchuan.demo.model.User;

public class LoginHandler extends Handler{
    @Override
    public void doHandler(User user) {
        if (!"admin".equals(user.getUsername()) || !"123".equals(user.getPassword())) {
            System.out.println("用户名或密码错误");
            return;
        }

        if (null != next) {
            next.doHandler(user);
        }
    }
}
